<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Breaking changes in 7.4 | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'breaking-changes-7.4.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/breaking-changes-7.4.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/breaking-changes-7.4.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/breaking-changes-7.4.html" rel="nofollow" target="_blank">../en/breaking-changes-7.4.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="breaking-changes.html">Breaking changes</a></span>
»
<span class="breadcrumb-node">Breaking changes in 7.4</span>
</div>
<div class="navheader">
<span class="prev">
<a href="breaking-changes-7.5.html">« Breaking changes in 7.5</a>
</span>
<span class="next">
<a href="breaking-changes-7.3.html">Breaking changes in 7.3 »</a>
</span>
</div>
<div class="chapter">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="breaking-changes-7.4"></a>Breaking changes in 7.4<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h2>
</div></div></div>

<p>This section discusses the changes that you need to be aware of when migrating
your application to Elasticsearch 7.4.</p>
<p>See also <a class="xref" href="release-highlights.html" title="7.7版本的新特性"><em>7.7版本的新特性</em></a> and <a class="xref" href="es-release-notes.html" title="Release notes">Release notes</a>.</p>
<h3>
<a id="breaking_74_plugin_changes"></a>Plugins changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_tokenizerfactory_changes"></a>TokenizerFactory changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>TokenizerFactory now has a <code class="literal">name()</code> method that must be implemented.  Most
plugin-provided TokenizerFactory implementations will extend <code class="literal">AbstractTokenizerFactory</code>,
which now takes a <code class="literal">name</code> parameter in its constructor.</p>
<h3>
<a id="breaking_74_search_changes"></a>Search Changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_forbid_empty_doc_values_in_vector_functions"></a>Forbid empty doc values in vector functions<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>If a document doesn’t have a value for a vector field (dense_vector
or sparse_vector) on which a vector function is executed, an error will
be thrown.</p>
<h4>
<a id="_use_float_instead_of_double_for_query_vectors"></a>Use float instead of double for query vectors<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>Previously, vector functions like <code class="literal">cosineSimilarity</code> represented the query
vector as an list of doubles. Now vector functions use floats, which matches
how the stored document vectors are represented.</p>
<h3>
<a id="breaking_74_snapshots_changes"></a>Snapshot and Restore changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_the_s3_repository_plugin_uses_the_dns_style_access_pattern_by_default"></a>The S3 repository plugin uses the DNS style access pattern by default<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>Starting in version 7.4 the <code class="literal">repository-s3</code> plugin does not use the
now-deprecated path-style access pattern by default. In versions 7.0, 7.1, 7.2
and 7.3 the <code class="literal">repository-s3</code> plugin always used the path-style access pattern.
This is a breaking change for deployments that only support path-style access
but which are recognized as supporting DNS-style access by the AWS SDK. If your
deployment only supports path-style access and is affected by this change then
you must configure the S3 client setting <code class="literal">path_style_access</code> to <code class="literal">true</code>. This
breaking change was made necessary by
<a href="https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/" class="ulink" target="_top">AWS’s
announcement</a> that the path-style access pattern is deprecated and will be
unsupported on buckets created after September 30th 2020.</p>
<h3>
<a id="breaking_74_http_changes"></a>HTTP changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_changes_to_encoding_plus_signs_in_urls"></a>Changes to Encoding Plus Signs in URLs<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>Starting in version 7.4, a <code class="literal">+</code> in a URL will be encoded as <code class="literal">%2B</code> by all REST API functionality. Prior versions handled a <code class="literal">+</code> as a single space.
If your application requires handling <code class="literal">+</code> as a single space you can return to the old behaviour by setting the system property
<code class="literal">es.rest.url_plus_as_space</code> to <code class="literal">true</code>. Note that this behaviour is deprecated and setting this system property to <code class="literal">true</code> will cease
to be supported in version 8.</p>
<h3>
<a id="breaking_74_cluster_changes"></a>Cluster changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_rerouting_after_starting_a_shard_runs_at_lower_priority"></a>Rerouting after starting a shard runs at lower priority<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>After starting each shard the elected master node must perform a reroute to
search for other shards that could be allocated. In particular, when creating
an index it is this task that allocates the replicas once the primaries have
started. In versions prior to 7.4 this task runs at priority <code class="literal">URGENT</code>, but
starting in version 7.4 its priority is reduced to <code class="literal">NORMAL</code>. In a
well-configured cluster this reduces the amount of work the master must do, but
means that a cluster with a master that is overloaded with other tasks at
<code class="literal">HIGH</code> or <code class="literal">URGENT</code> priority may take longer to allocate all replicas.</p>
<p>Additionally, before 7.4 the <code class="literal">GET
_cluster_health?wait_for_no_initializing_shards</code> and <code class="literal">GET
_cluster/health?wait_for_no_relocating_shards</code> APIs would return only once all
pending reroutes have completed too, but starting in version 7.4 if you want to
wait for the rerouting process to completely finish you should add the
<code class="literal">wait_for_events=languid</code> query parameter when calling these APIs.</p>
<h3>
<a id="breaking_74_allocation_changes"></a>Allocation changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="_auto_release_of_read_only_allow_delete_block"></a>Auto-release of read-only-allow-delete block<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>If a node exceeds the flood-stage disk watermark then Elasticsearch adds the
<code class="literal">index.blocks.read_only_allow_delete</code> block to all of its indices to prevent
further writes, as a last-resort attempt to prevent the node completely
exhausting its disk space. In earlier versions this block would remain in place
until manually removed, causing confusion for users who currently have ample
disk space and who are not aware that they nearly ran out at some point in the
past. From 7.4 onwards the block is automatically removed when the node drops
below the high watermark again, with the expectation that the high watermark is
some distance below the flood-stage watermark and therefore the disk space
problem is truly resolved. Since this block may be automatically removed, you
can no longer rely on adding this block manually to prevent writes to an index.
You should use the <code class="literal">index.blocks.read_only</code> block instead. This behaviour can
be disabled by setting the system property
<code class="literal">es.disk.auto_release_flood_stage_block</code> to <code class="literal">false</code>.</p>
<h3>
<a id="breaking_74_settings_changes"></a>Settings changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="breaking_74_unique_realm_names"></a>Authentication realm name uniqueness is enforced<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>Authentication realm name uniqueness is now enforced. If you configure more than one realm of any type
with the same name, the node fails to start.</p>
<h4>
<a id="deprecate-pidfile"></a><code class="literal">pidfile</code> setting is being replaced by <code class="literal">node.pidfile</code><a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>To ensure that all settings are in a proper namespace, the <code class="literal">pidfile</code> setting is
deprecated, and will be removed in version 8.0.0. Instead, use <code class="literal">node.pidfile</code>.</p>
<h4>
<a id="deprecate-processors"></a><code class="literal">processors</code> setting is being replaced by <code class="literal">node.processors</code><a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>To ensure that all settings are in a proper namespace, the <code class="literal">processors</code> setting
is deprecated, and will be removed in version 8.0.0. Instead, use
<code class="literal">node.processors</code>.</p>
<h3>
<a id="breaking_74_transform_changes"></a>Transform changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="transform_stats_format"></a>Stats response format changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>The response format of the <a class="xref" href="get-transform-stats.html" title="Get transform statistics API">Get transform statistics</a> is very different
to previous versions:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">task_state</code> and <code class="literal">indexer_state</code> are combined into a single <code class="literal">state</code> field
that replaces the old <code class="literal">state</code> object.
</li>
<li class="listitem">
Within the <code class="literal">checkpointing</code> object, <code class="literal">current</code> is renamed to <code class="literal">last</code> and
<code class="literal">in_progress</code> to <code class="literal">next</code>.
</li>
<li class="listitem">
The <code class="literal">checkpoint</code> number is now nested under <code class="literal">last</code> and <code class="literal">next</code>.
</li>
<li class="listitem">
<code class="literal">checkpoint_progress</code> is now reported in an object nested in the <code class="literal">next</code>
checkpoint object. (If there is no <code class="literal">next</code> checkpoint then no checkpoint is
in progress and by definition the <code class="literal">last</code> checkpoint is 100% complete.)
</li>
</ul>
</div>
<p>For an example of the new format see <a class="xref" href="get-transform-stats.html#get-transform-stats-example" title="Examples">Examples</a>.</p>
<h3>
<a id="breaking_74_df_analytics_changes"></a>Data frame analytics changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h3>
<h4>
<a id="progress_reporting_change"></a>Changes to progress reporting<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_4.asciidoc">edit</a>
</h4>
<p>The single integer <code class="literal">progress_percent</code> field at the top level of the
data frame analytics job stats is replaced by a <code class="literal">progress</code> field that is an array
of objects. Each object contains the <code class="literal">phase</code> name and <code class="literal">progress_percent</code> of one
phase of the analytics. For example:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">{
  "id" : "my_job",
  "state" : "analyzing",
  "progress" : [
    {
      "phase" : "reindexing",
      "progress_percent" : 100
    },
    {
      "phase" : "loading_data",
      "progress_percent" : 100
    },
    {
      "phase" : "analyzing",
      "progress_percent" : 47
    },
    {
      "phase" : "writing_results",
      "progress_percent" : 0
    }
  ]
}</pre>
</div>
</div>
<div class="navfooter">
<span class="prev">
<a href="breaking-changes-7.5.html">« Breaking changes in 7.5</a>
</span>
<span class="next">
<a href="breaking-changes-7.3.html">Breaking changes in 7.3 »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>